//
//  PPImageTransaction.h
//  pickpic
//
//  Created by Jinxiao on 9/25/16.
//  Copyright © 2016 MicroDream. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface PPImageTransaction : NSObject

+ (instancetype)sharedInstance;

- (void)prepareTransactionWithArtwork:(PPAbstractArtwork *)artwork completion:(void (^)(void))completion;

- (void)beginTransactionWithAlbumID:(PPAlbumID)albumID identifier:(NSString *)identifier key:(NSString *)key token:(NSString *)token completion:(void (^)(PPAlbumImageID imageID, NSError *error))completion;

- (void)beginTransactionWithIdentifier:(NSString *)identifier key:(NSString *)key token:(NSString *)token completion:(void (^)(NSError *error))completion;

- (void)endTransactionWithItendifier:(NSString *)identifier;

- (UIImage *)imageForKey:(NSString *)key;

- (BOOL)containsIdentifier:(NSString *)identifier;

- (void)beginTransactionWithupImage:(UIImage *)image key:(NSString *)key token:(NSString *)token completion:(void (^)(NSError *))completion;
@end
